package net.mingsoft.basic.exception;

import org.springframework.http.*;

@Deprecated
public class BusinessException extends RuntimeException
{
    private HttpStatus code;
    private String msg;
    private Object data;
    private String url;
    
    public BusinessException(final String msg) {
        super(msg);
        this.code = HttpStatus.INTERNAL_SERVER_ERROR;
        this.msg = msg;
    }
    
    public BusinessException(final HttpStatus code, final String msg, final Object data) {
        super(msg);
        this.code = HttpStatus.INTERNAL_SERVER_ERROR;
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    
    public BusinessException(final String msg, final Object data) {
        super(msg);
        this.code = HttpStatus.INTERNAL_SERVER_ERROR;
        this.msg = msg;
        this.data = data;
    }
    
    public BusinessException(final String msg, final String url) {
        super(msg);
        this.code = HttpStatus.INTERNAL_SERVER_ERROR;
        this.msg = msg;
        this.url = url;
    }
    
    public BusinessException(final HttpStatus code, final String msg) {
        super(msg);
        this.code = HttpStatus.INTERNAL_SERVER_ERROR;
        this.code = code;
        this.msg = msg;
    }
    
    public HttpStatus getCode() {
        return this.code;
    }
    
    public void setCode(final HttpStatus code) {
        this.code = code;
    }
    
    public String getMsg() {
        return this.msg;
    }
    
    public void setMsg(final String msg) {
        this.msg = msg;
    }
    
    public Object getData() {
        return this.data;
    }
    
    public void setData(final Object data) {
        this.data = data;
    }
    
    public String getUrl() {
        return this.url;
    }
    
    public void setUrl(final String url) {
        this.url = url;
    }
}
